import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';

import { ModalModule, AlertModule, BsDatepickerModule } from 'ngx-bootstrap';
import { defineLocale } from 'ngx-bootstrap/bs-moment';
import { zhCn } from 'ngx-bootstrap/locale';
defineLocale('zh-cn', zhCn);

import { MatRadioModule, MatButtonModule, MatIconModule } from '@angular/material';
import { MatNativeDateModule, MatDatepickerModule, MAT_DATE_LOCALE } from '@angular/material';

// 主页
import { HomeComponent } from '../component/home/home.component';

// 菜单
import { MenuListComponent } from '../component/menu/menu.list.component';
import { MenuEditComponent } from '../component/menu/menu.edit.component';
// 人员
import { UserListComponent } from '../component/user/user.list.component';
import { UserEditComponent } from '../component/user/user.edit.component';
// 角色
import { RoleListComponent } from '../component/role/role.list.component';
import { RoleEditComponent } from '../component/role/role.edit.component';

// demo
import { DemoListComponent } from '../component/demo/demo.list.component';
import { DemoEditComponent } from '../component/demo/demo.edit.component';

// 共享模块
import { ShareModule } from '../../share/module/share.module';

// 路由
import { SystemRouter } from '../router/system.router';


// 富文本编辑器
import { CKEditorModule } from 'ng2-ckeditor';
// 文件上传
import { FileUploadModule } from 'ng2-file-upload';

// 树
import { TreeviewModule } from 'ngx-treeview';

/**
 * 平台n
 */
@NgModule({
  declarations: [
    HomeComponent,

    MenuListComponent,
    MenuEditComponent,

    UserListComponent,
    UserEditComponent,

    RoleListComponent,
    RoleEditComponent,

    DemoListComponent,
    DemoEditComponent,

  ],
  imports: [
    CommonModule,
    FormsModule,
    MatRadioModule,
    MatButtonModule,
    MatIconModule,

    MatNativeDateModule,
    MatDatepickerModule,

    CKEditorModule,
    FileUploadModule,
    ModalModule.forRoot(),
    AlertModule.forRoot(),
    BsDatepickerModule.forRoot(),

    TreeviewModule.forRoot(),

    ShareModule,

    SystemRouter,
  ],
  providers: [
    { provide: MAT_DATE_LOCALE, useValue: 'zh-cn' },
  ],
})
export class SystemModule { }
